﻿using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GISTools.Generators;
using GISCore;
using GISCore.Geometry;
using GISCore.Geometry.IO;

namespace GISTools
{
    class Program
    {
        static void Main(string[] args)
        {
            string inPath = "../../../GISUnitTests/Test Data/layerGenerated.gml";
            string outPath = "../../../GISUnitTests/Test Data/layerGenerated2.gml";
            using (FileStream infs = new FileStream(inPath, FileMode.Open, FileAccess.Read),
                    outfs = new FileStream(outPath, FileMode.Create, FileAccess.Write))
            {
                IFileHandler handler = new GMLFileHandler(0);
                Layer genLayer = handler.Read(infs);
                IMapGenerator generator = new ShiftMapGenerator(genLayer, 0.1);
                Layer newLayer = generator.Generate();
                handler.Write(newLayer, outfs);
                
            }
            using (FileStream fs = new FileStream(outPath, FileMode.Open, FileAccess.Read))
            {
                IFileHandler handler = new GMLFileHandler(1);
                Layer test = handler.Read(fs);
            }
        }
    }
}
